package com.jkm.boss.dao;

import com.jkm.rwseparate.DataSource;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.jkm.boss.entity.AdminUser;

/**
 * Created by shitou on 17/4/17.
 */
@Repository
public interface AdminUserDao {
    /**
     * 根据主键查找
     *
     * @param id
     * @return
     */
    @DataSource("read")
    AdminUser selectById(@Param("id") long id);
    /**
     * 根据用户名查找
     *
     * @param username
     * @return
     */
    @DataSource("read")
    AdminUser selectByUsername(@Param("username") String username);
    /**
     * 最后一次登陆时间
     * @param id
     * @return
     */
    void updateLastLoginDate(@Param("id") long id);


}
